home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Sample Code / Standard Catalog Package / DTS AddressOMatic / Src / LogManager.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-03  |  2.5 KB  |  104 lines  |  [TEXT/KAHL]

  1. /*                                    LogManager.h                                */
  2. /*
  3.  * LogManager.h
  4.  * Copyright © 1993 Apple Computer Inc. All rights reserved.
  5.  *
  6.  * These functions manage a logging display for error messages and other text.
  7.  * The log is implemented as a ListManager list that can hold nLogItems. This
  8.  * module is intentionally more-or-less self-contained so it can easily be
  9.  * exported to other applications.
  10.  */
  11. #ifndef THINK_C                /* MPW includes            */
  12. #include <Errors.h>
  13. #include <Script.h>
  14. #include <Types.h>
  15. #include <Resources.h>
  16. #include <QuickDraw.h>
  17. #include <Fonts.h>
  18. #include <Events.h>
  19. #include <Windows.h>
  20. #include <ToolUtils.h>
  21. #include <Memory.h>
  22. #include <Lists.h>
  23. #endif
  24. /*
  25.  * CreateLog
  26.  *        Create a new log display in the current window. To define a log, first
  27.  *        SetPort to the window, and pass viewRect in window coordinates. Returns
  28.  *        NULL on errors. if nLogLines is zero, a default value (128) will be used.
  29.  */
  30. ListHandle                            CreateLog(
  31.         const Rect                        *viewRect,
  32.         short                            listFontNumber,
  33.         short                            listFontSize,
  34.         short                            nLogLines
  35.     );
  36. /*
  37.  * DisposeLog
  38.  *        Dispose of the log. logListHandle may be NULL.
  39.  */
  40. void                                DisposeLog(
  41.         ListHandle                        logListHandle
  42.     );
  43. /*
  44.  * DoClickInLog
  45.  *        Call on a mouse-down in the log viewRect. Returns FALSE if the mouse-down
  46.  *        wasn't in the viewRect (this isn't really an error, but lets you call
  47.  *        DoClickInLog on all mouseDown's). Note: the port should be set to the log
  48.  *        window. You cannot select text in the log.
  49.  */
  50. Boolean                                DoClickInLog(
  51.         ListHandle                        logListHandle,
  52.         const EventRecord                *eventRecord
  53.     );
  54. /*
  55.  * UpdateLog
  56.  *        Call on update events in the log window.
  57.  */
  58. void                                UpdateLog(
  59.         ListHandle                        logListHandle
  60.     );
  61. /*
  62.  * ActivateLog
  63.  *        Call on activate, suspend, and resume events.
  64.  */
  65. void                                ActivateLog(
  66.         ListHandle                        logListHandle,
  67.         Boolean                            activating
  68.     );
  69. /*
  70.  * MoveLog
  71.  *        Move the log area within the window.
  72.  */
  73. void                                MoveLog(
  74.         ListHandle                        logListHandle,
  75.         short                            leftEdge,
  76.         short                            topEdge
  77.     );
  78. /*
  79.  * SizeLog
  80.  *        Change the size of the log area.
  81.  */
  82. void                                SizeLog(
  83.         ListHandle                        logListHandle,
  84.         short                            newWidth,
  85.         short                            newHeight
  86.     );
  87. /*
  88.  * LogStatus
  89.  *        Call with an error status code and some text to display.
  90.  */
  91. void                                LogStatus(
  92.         ListHandle                        logListHandle,
  93.         OSErr                            theError,
  94.         const StringPtr                    infoText
  95.     );
  96. /*
  97.  * DisplayLogString
  98.  *        Call with some text to display.
  99.  */
  100. void                                DisplayLogString(
  101.         ListHandle                        logListHandle,
  102.         const StringPtr                    theString
  103.     );
  104.